var income = new Vue({
	el: "#app",
	data: {
		storeId: '',
		incomeDetail:{
			user:{
				
			}
		},
	},
	//计算属性
	computed: {},
	//监听属性
	watch: {},
	//钩子函数
	created() {
		var searchUrl = window.location.href;
		var searchData = searchUrl.split("="); //截取 url中的“=”,获得“=”后面的参数
		var searchText = decodeURI(searchData[1]); //decodeURI解码
		this.storeId = searchText
	},
	mounted() {
		this.getIncomeDetail()
	},
	methods: {
		getIncomeDetail(){
			var that = this
			s5.initData({url:'/user-income-detail',type:"post",data:{id:this.storeId}},(res)=>{
				var data = JSON.parse(res)
				that.incomeDetail = data.data
				if (data.code != 200) {
					weui.confirm(data.msg, {
						title: '温馨提示',
						buttons: [{
							label: 'NO',
							type: 'default',
							onClick: function() {
								console.log('no')
							}
						}, {
							label: 'YES',
							type: 'primary',
							onClick: function() {
								window.location.href = 'index.html'
								console.log('yes')
							}
						}]
					});
				}
			})
		}

	}
})


		